#include <stdio.h>

void sum(int * a, int * b, char * buff)
{
    *a = 4;
    *b = 5;

    printf("buff = %s\n", buff);
}


void un_sum(int a, int b, char * buff)
{
    a = 4;
    b = 5;

    printf("buff = %s\n", buff);
}

void p_variable(int a, int b)
{
    printf("invoke a = %d, b = %d\n", a, b);

    a = 55;
    b = 66;
}

void main()
{
    int a, b;
    char buff[12] = "xiaozhi";

    a = b = 0;
    sum(&a, &b, buff);
    printf("a = %d, b = %d\n", a, b);   // a = 4, b = 5

    a = b = 0;
    un_sum(a, b, buff);
    printf("a = %d, b = %d\n", a, b);   // a = 0, b = 0

    a = b = 8;
    p_variable(a, b);
    printf("a = %d, b = %d\n", a, b);   // a = 8, b = 8
}
